package com.liwen.web.controller;

import com.liwen.api.vo.OrderVO;
import com.liwen.service.coop.jd.JDService;
import com.liwen.service.depend.FileService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.annotation.Resource;

@Controller
public class MainController {
    private Logger log = LoggerFactory.getLogger(this.getClass());
    @Resource
    private JDService jdService;

    @GetMapping("/sayHello")
    public OrderVO sayHello() {//通过切面改变返回值
        String sn = "1180827713227803";
        OrderVO vo = jdService.getOrderInfo(sn);//测试redis
        jdService.testMessage();//测试消息发送
        jdService.testCountDown();//测试CountDownLatch使用
        FileService file = new FileService();
        file.pullRepayPlan("");//测试文件读取并处理


        return vo;
    }
}
